<table class="table table-bordered table-hover table-striped">
	<?if($payment_modes):?>
		<tbody>
			<thead>
				<td>Month</td>
				<td style="text-align:right;">Payment Due</td>
				<td style="text-align:right;">Paid</td>
			</thead>
			<?foreach($payment_modes as $v):?>
					<?
						$sum['due'][] = $v->spm_value;
						$sum['paid'][] = $v->student_paid;
					?>
					<tr>
						<td><?=$v->month_name;?></td>
						<td  style="text-align:right;"><?=number_format($v->spm_value,2,'.',',');?></td>
						<?if($v->student_paid == 0.00):?>
							<td style="color:#f00;font-weight:bold;text-align:right;"><?=number_format($v->student_paid,2,'.',',');?></td>
						<?else:?>
							<td  style="color:#035F11;font-weight:bold;text-align:right;"><?=number_format($v->student_paid,2,'.',',');?></td>
						<?endif;?>
					</tr>
			<?endforeach;?>
					<tr class="info">
						<td></td>
						<td style="color:#1212FC;font-weight:bold;text-align:right;"><?=number_format(array_sum($sum['due']),2,'.',',');?></td>
						<td style="color:#1212FC;font-weight:bold;text-align:right;"><?=number_format(array_sum($sum['paid']),2,'.',',');?></td>
					</tr>
			<?if($others):?>
				<tr>
					<td colspan="3" style="font-weight:bold;">Additional Fees</td>
				</tr>
				
				<?foreach($others as $k => $v):?>
					<?if($type == 'spb'):?>
					<tr>
						<td><?=$v->spb_fee_name;?></td>
						<td style="text-align:right;"><?=$v->spb_remaining_balance;?></td>
						<td style="text-align:right;"><?=$v->spb_amount_paid;?></td>
					</tr>
					<?else:?>
						<tr>
							<td><?=$v->sef_fee_name;?></td>
							<td><?=$v->sef_fee_rate;?></td>
							<td>0.00</td>
						</tr>
					<?endif?>
				<?endforeach;?>
			<?endif;?>
		</tbody>
	<?else:?>
		<hr class="clearfix">
		<div class="alert-box">No Payment Mode.</div>
	<?endif;?>
</table>